home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
editor
/
stopframe.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-06
|
3KB
|
107 lines
/* StopFrame.rexx Grabs frames on cue from GPI trigger for stop-action animation */
/* By Arnie Cachelin © 1992 NewTek Inc. */
/*
This program will grab and save frames on cue from the GPI trigger.
If you enter a number to grab, it will save that many then exit.
Otherwise, 3 frames will be saved, then the prog. will exit. Since
the Toaster is waiting for GPI input most of the time, it will not
respond to anything else, which you may find annoying. You can easily
give your Toaster GPI pulses by attaching a spare mouse or joystick to
the second mouse port then clicking the button. You can also find long
joystick extender cables at places like Radio Shack.
To grab frames for a claymation of stop-motion style animation, setup your
camera and 'actors', hook up a GPI trigger, and start this script with
appropriate arguments. When your first frame is ready, hit the trigger
to grab and save it. The toaster will then go into an 'onionskin' mode
where the camera is half dissolved over the last frame for ease of
positioning the actors. When you hit the GPI again, the Toaster will leave
onionskin mode and grab the next frame, then return to onionskin mode.
For best results, watch out for stray shadows, or shadows from the sun which
will change over the course of your shoot.
*/
OPTIONS RESULTS
parse arg count name startframe
if count="" then count=3
if startframe="" then startframe=0
TOASTERLIB="ToasterARexx.port"
call remlib('ToasterARexx.port')
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT' , 0)
call set_view(2)
if req_tell("StopFrame 2.0") = 0 then call quit
rx startfilereq("Save Frames Where?","Toaster:Images","StopMotion.Rgb.")
exit=1
do while exit=1
name=queryfilereq()
if name=0 then call quit
if name~="" then exit=0
address command "c:wait 1"
say name
end
count=0
do while(count<1)
count=req_number("Number Of Frames To Grab",100)
if count=0 then call quit
end
startframe=0
do while(startframe<1)
startframe=req_number("Starting Frame #",1)
if startframe=0 then call quit
end
input=req_number("Input To Grab From 1-4",1)
if input=0 then call quit
if input>4 then input=4
inputp="P00"||input
inputm="M00"||input
if req_tell("Still want to continue?")=0 then call quit
IF ~SHOW('Libraries',TOASTERLIB) THEN
IF ~ADDLIB(TOASTERLIB , 0) THEN say "Please start your Toaster"
say "Saving "count" frames as "name
Switcher(TOSW) /* Go to Switcher screen */
/*if ~Switcher(CKGD,A48) then Switcher(GRID,A11) /* Select Fade in getsmall */*/
/*else Switcher(GRID,A48)*/
Switcher(inputp)
Switcher(LVID)
Switcher(PDV1)
Switcher(inputp)
Switcher(SGPI,POS) /* Set GPI trigger to positive (leading edge of pulse) */
Switcher(WAIT,GPI) /* Wait for GPI trigger to come in for first frame */
Do i=startframe to startframe+count-1
Switcher(FVID) /* Freeze frame */
Frame=right(trim(i),3,"0")
fname =strip(name)||right(i,3,'0')
call Switcher(SRGB,fname,0,5)
Switcher(inputp)
Switcher(MDV1)
Switcher(TBAR,255)
call req_open("Current Frame ("||right(i,3,'0')||")")
Switcher(WAIT,GPI) /* Wait for GPI trigger to come in */
Switcher(AUTO)
Switcher(LVID) /* Set to live digital video */
Switcher(PDV1)
Switcher(inputp)
Switcher(FRES)
Switcher(WAIT,60)
call req_close()
end
call req_tell("All Done!")
call remlib('PROJECT_REXX_PORT')
call remlib('ToasterARexx.port')
exit